package com.amigo.online.message.util.onesignal;

import org.springframework.http.HttpHeaders;

//import com.amigo.online.message.entity.AuthMessage;

public class OneSignalHttpUtil {

    public final static  String REST_API_KEY = "Basic YTdmNTU3NWMtOGJlNC00ZTIzLWI3ODctZWNjNzRmMTg3ZWQz";
    public final static  String ONESIGNAL_APP_ID = "51208249-8fe5-4e20-8e1e-40dd62337b63";


    public static HttpHeaders getHeaders(){
        HttpHeaders requestHeaders = new HttpHeaders();
        requestHeaders.add("Content-Type","application/json");
        requestHeaders.add("Authorization", REST_API_KEY);

        return requestHeaders;
    }

    /**
     * 获取带token的请求头
     * @param token
     * @return
     */
    public static HttpHeaders getTokenHeaders(String token){
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type","application/json");
        headers.add("Accept", "application/json;charset=UTF-8");
        headers.add("token", token);
        return headers;
    }
}

